package spring.aspectj.c01;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AOPTest {

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				"context.xml", AOPTest.class);
		AService aService = (AService) context.getBean("aService");
		try {
			String result = aService.barA();
			System.out.println("process");
			System.out.println(result);
		} catch (Exception e) {
			e.printStackTrace();
			System.out.println("exception");
			System.out.println(e.getCause().getMessage());
		}

		System.out.println("over");
	}

}
